Method for determining the wood/bark ratio from a flow of wood material

ABSTRACT

A method for determining the wood/bark ratio from a flow of wood material, in which the flow is illuminated in a non-flashing manner, scanned along a transverse line with a video camera with at least three channels, the line image corresponding to the line is digitalized into pixels each of which comprise intensity information, the intensity classes corresponding to the wood and the bark are determined in each channel and the pixels belonging to each class are calculated with the help of their intensity-information, and the wood/bark ratio is determined by the number of pixels situated in the different intensity classes. The dynamics of each channel are at least 10, most preferably 12 bit.

TECHNICAL FIELD

The invention relates to a method for determining the wood/bark ratiofrom a flow of wood material, in which the flow is illuminated, scannedalong a transverse line with a video camera, the line imagecorresponding to the line is digitalized into pixels each of whichcomprise intensity information, the intensity classes corresponding tothe wood and the bark are determined and the pixels belonging to eachclass are calculated with the help of their intensity information, andthe wood/bark ratio is determined by the number of pixels situated inthe different intensity classes.

BACKGROUND OF THE INVENTION

It is important to know the content of bark and wood in order to be ableto peel the logs in an optimal way. By regulating the peeling process insuch a way that the content of bark reaches the desired limiting values,it is on the one hand possible to avoid overpeeling and, on the otherhand, possible to monitor the fulfilment of the quality requirementsrelating to the content of bark.

An on-line method for determining the wood/bark ratio from a flow ofwood material has been presented in the publication of the application831320 concerning a European Patent. In the said method the flow of woodmaterial is scanned with a CCD line camera that is fixed in thedirection transverse to the flow, in which there are 30-300 pixels/cmeach of which measures the gray scale of the corresponding image field.The pixels are divided into main groups and subgroups are chosen fromthese main groups in which there exist at the most a chosen number(1-20) of adjacent pixels, the gray scale of which exceeds a set limit.The subgroups are filtered from the main groups and the averagebrightness is calculated for each completed group. The wood and the barkand possibly the background have been set their own classes ofbrightness, according to which each group is classed into its own classof brightness. The wood/bark ratio in the flow of wood is calculated onthe basis of the pixels situated in each class. The method according tothe publication is not very suitable for determining a wood chip flowthat contains the bark of birches. The wood material of birches and thegray scales of the surface side of their bark are so close to each otherthat it is especially difficult to separate one from the other.

The Finnish patent 95511 presents a method for determining thedifferently colored surface areas from a flow of material, which is setto move forward on a transparent conveyor. Backgrounds in accordancewith the partial colors are used in the many consecutive chambers, withwhich backgrounds each color is filtered in its turn. The color of thebark of trees differs somewhat, and the method is not well suited todetermining the wood/bark ratio. Attention has not been paid to theeffect of the layer height (height of the surface) to the surveyresults. The pieces of wood chips do not move on the conveyor asseparate pieces but often as layers as thick as 20-50 cm. Furthermore,the wood chip and bark conveyors are not transparent.

Publication W097/37780 presents a color separator, in which severalimages are taken with the help of an RGB color camera of the subjects tobe classified and the images are turned into color shade and colorsaturation values, on the basis of which the classification is carriedout. Scanning technology of 24 bit dynamics (3*8 bits) is utilized inthe method, whereby in the color space of a specific yellow-brown areathe color separating ability is not of a sufficiently good level for thecolor separation of wood and bark. In addition to this, 8 bitdynamics/channel has the problem that the sensor is easily saturated ifan attempt has been made efficiently to take advantage of all the 256gray scale values.

U.S. Pat. No. 5,887,073 presents a color separator in which pixels ofset color are separated from a 3×8 bit RGB image into their own image.As above, there is here a low dynamics. In addition to this, intensityneutral color and color saturation color coordinates are used, but notat all any intensity information and the color response is notstabilized.

The invention relates to a method for determining bark and wood content.It is important to know the bark and wood content, so that the peelingof logs may be carried out in an optimal way. At the present time, thedetermining of the quality of wood chips is almost solely based on thetaking of random samples, taken in different ways, and on the resultsachieved by the analysis of these samples. It is difficult to take arepresentative sample from a batch of wood chips. Furthermore, thetaking of samples and especially the analyses are laborious and timeconsuming. It is not in practice possible to regulate the process withthe help of the measurements, and the measurements only have meaning asa means of control. Continuously functional indicators based on grayscale CCD cameras are also available, but with them it is possibleaccurately to measure mainly the wood content on a bark conveyor. Thedetermining of bark content on a wood chip conveyor is a much moredemanding task, since the bark content to be measured is often 0.1-1.5%.The darkness of the bark of many kinds of wood makes the opticalobservation more difficult.

SUMMARY OF THE INVENTION

The object of this invention is to achieve an improved method fordetermining the wood/bark ratio in a flow of wood material. Thecharacteristic features of the method according to the invention arepresented in the adjoining patent claims. The changing of the black andwhite camera used in the method according to the EP-publication to a 24bit color camera of the same level does not considerably improve theability to separate, because it is difficult to recognize the color ofthe bark in a reliable manner and the color responses are not stable.

It is possible to improve the accuracy of the measurements to aconsiderable extent with the help of color information, when at the sametime the dynamics (per channel) are improved to the level of at least 10bits, most profitably 12 bits and the color responses are stabilized. Itis then also essential to make the classification at leastthree-dimensionally. In order to achieve the best accuracy of themeasurements, the color response needs to be stabilized.

The color stimulus Φ(Υ) is some combination of the effect spectrum(S(Υ)) and, depending on the subject, of the transmission (T(Υ)),reflection (R(Υ)) or radiance spectrum (r(Υ)). When examining the woodor bark content by a CCD color camera technique it is a question of thereflection spectrum (R(Υ)) of the surface. The values R, G and B of thecolor components are obtained as the scalar product of the colorstimulus Φ(Υ) and the sensitivity curves r(Υ), g(Υ) and b(Υ) of the red,green and blue components of the camera. $\begin{bmatrix}R \\G \\B\end{bmatrix} = {\int{{{\Phi (\lambda)}\begin{bmatrix}{r(\lambda)} \\{g(\lambda)} \\{b(\lambda)}\end{bmatrix}}{\lambda}}}$

The values (R, G and B) of the color components disclose the internalrelations of the primary colors (blue, green and red) in the colormixture. In the method presented here the effect of the subject's changeof brightness is minimized by calculating the relative shares of thecolor components r, g and b (r=R/(R+G+B), g=G/(R+G+B) and b=B/(R+G+B),whereby r, g and b are not dependant on the extent of the radiationpower if the form of the spectrum of the source of light stays the same.This requirement is in practice fulfilled when the lights are notregulated in ways that would affect the color temperature of the sourceof light (no thyristor regulators are used) and the sources of light areallowed to stabilize for a time of sufficient length before starting themeasurements (about 30 min).

The lighting must be non-flashing and its changes need to be compensatedfor. Non-flashing lighting may also be produced by synchronizing thescanning to the frequency of the lighting.

By taking advantage of the line camera technique, an even lighting ofthe subject may be achieved considerably more easily and more evenlythan with the matrix camera technique. If the size of the scanned areais physically e.g. 600 mm×600 mm, when using a matrix camera it isnecessary to illuminate the whole 600 mm×600 mm area evenly from thecenter of the area as well as from its edges. In the line cameratechnique it is enough evenly to illuminate a 600 mm wide area in thedirection transverse to the conveyor but only about 1-2 mm in length.With the line camera, a chosen number of line images is taken one afterthe other from the moving flow. The consecutive lines are connected toone separate image usually already by the image card attached to thecamera and an image matrix is achieved for further processing. Differentimage processing operations are performed on the image matrix. The mostessential information from the point of view of the invention iscontained in each separate line image. In order to achieve statisticalreliability, a vast number of line images is included in thecalculation.

In the method according to the invention the correction of the intensityhas been achieved in two different ways: first, an rgb-image iscalculated from the RGB image and, secondly, the intensity informationof the chosen color channel (R or G) that corresponds well to theoverall intensity is transformed with the help of a measuring of theheight of the surface to intensity information that is independent ofthe layer height.

DETAILED DESCRIPTION OF THE INVENTION

The adjoining FIGURE presents a measuring arrangement according to theinvention. The flow of material 1 moves from the left to the right inthe figure e.g. by belt conveyor 5. The place that is to be scanned (thetransverse line) is illuminated with lights 3 and the height of the woodchip surface at the place of scanning is measured with an indicator ofthe height of the surface 6 (e.g. an ultrasound measuring device, i.e. aUS probe). The measuring is synchronized in accordance with the speed ofthe transporter. With the help of color line camera 2 a two-dimensional,digitalized image is obtained from the flow of wood material, when theconsecutive line images are connected into the same matrix. A measuringof the height of the surface is advantageous, because the lightintensity discerned by the camera drops in proportion to the square ofthe distance. Hereby the changes in the intensity in the RGB channels,caused by the changes in the layer height can be eliminated and also theintensity information of the subjects can be taken advantage of in theanalysis.

The detailed stages of the method according to the invention are thefollowing. The following example presents a three-channel solution.Several colour channels can be used in a corresponding manner.

1) The subject is illuminated with a non-flashing light (e.g. halogenlights or light sources provided with an electronic controlling unit).

1b) The measuring only takes place if according to the informationreceived from the US probe the layer height is sufficient, whereby thetransporter belt will not be visible on the wood chip conveyor.

2) The subject is scanned with a three-channel, most profitably 36 bitRGB line camera (12 bits/channel). When each probe has i pixels (e.g.1000 pixels) and when a number equal to j (e.g. 600) consecutive linesis scanned, three image matrices (R-, G- and B-image matrices) of thesize [i,j] are formed from the subject that is scanned.

3) The biases R0, G0 and B0 of the corresponding channels are deductedfrom the image matrices of each channel R, G and B. The biases have beenpredefined by measuring the gray scales of the channels at a time whenno light is allowed to shine on the probe. The correction of the bias isa very important measure when determining the colour of dark subjects,when the measured colour coordinate is close to the bias value of thechannel in question.

4) From the images (R, G and B) in which the bias has been corrected,the corresponding intensity neutral rgb-image matrices are calculated,in which r=R/(R+G+B), g=G/(R+G+B) and b=B/(R+G+B).

5) Each image point A(x,y) is classified as of the type bark or of thetype wood in the rgb-space. For example an NN-classifier (nearestneighbor) can be used in the classification, whereby image point A(x,y)is classified as belonging to the class closest to which itsrgb-coordinates are in some (normally Eucledian) geometry. It isnoteworthy that bark and wood may have more than 1 class center. Forexample in the case of birch there can exist class centers both on thewhite bark and on the darker inner bark of the birch. The class centersare determined in advance by analysing known samples (such as is done inFIG. 4 of U.S. Pat. No. 5,887,073).

6) The intensity information of one of the channels the bias of whichhas been corrected (preferably R or G) is corrected with the help of asignal measured by a US probe, whereby it is possible also to takeadvantage of the intensity information of the subjects. In order to beable to take advantage of the intensity information it is necessary thatthe effect of the change of the layer height has been eliminated.

7) The points l(x,y) of the said intensity corrected matrix areclassified according to the lightness of the pixel as either bark orwood. In the case of a wood chip conveyor, those points ate classifiedas bark for which the following is true:

If I(i,j)<T1 and I(i,(j−H))<T2 and I(i,j+H))<T2,

then the subject is made up of bark.

Here T1 and T2 are set intensity criteria and H is the requiredtransition criterion (e.g. 5). Now for T1 and T2, T1<T2 is true and withthe help of H and T2 it is possible to fix the limits to the length anddarkness of the subject. Those points for which the following is trueare correspondingly accepted as wood on a wood chip conveyor:

If I(i,j)>T1 and I(i,j−H))>T2 and I(i,j+H))>T2,

then the subject is made up of wood. Now T1>T2.

8) The classifications that have been carried out in the stages 5 and 7are combined, whereby in the case of a wood chip line only those imagepoints are accepted as bark that have been recognized as bark in bothstages 5 and 7. Correspondingly in the case of a bark line only thosepoints are accepted as wood that have been recognized as wood in bothstages 5 and 7. Depending on the situation, it is possible to use someother condition.

9) The bark-% or the wood-% is calculated as the ratio of the classifiedpixels.

Shadows that are caused by the partial overlapping of the pieces of woodchips may cause lighting problems on a wood chip line, because themachine sight system may in some situations classify the shadows asbark. A method in which form information of the areas that are to besegmented may be used in the segmentation of the image in addition tothe intensity information may be used to eliminate the effect of theshadows, i.e. a specific shape is required of the object in order for itto be accepted as a subject. In order to determine the form areas, theintensity matrix is graded with a grading method that takes into accountthe forms of the subject, and an additional requirement is set to thechosen class in the classification, stating that the form of a pixelthat is to be placed in this class must belong to a form area thatfulfills the criteria.

Although the invention has been described by reference to specificembodiments, it should be understood that numerous changes may be madewithin the spirit and scope of the inventive concepts described.Accordingly, it is intended that the invention not be limited to thedescribed embodiments, but that it have the full scope defined by thelanguage of the following claims.

What is claimed is:
 1. A method for determining the wood/bark ratio froma flow of wood material, in which the flow is illuminated in anon-flashing manner with a lighting having a color temperature, scannedalong a transverse line with a video camera, the line imagecorresponding to the line is digitalized into pixels each of whichcomprise intensity information, the intensity classes corresponding tothe wood and the bark are determined and the pixels belonging to eachclass are calculated with the help of their intensity information, andthe wood/bark ratio is determined by the number of pixels situated inthe different intensity classes, and at least three color channels areused the dynamics of which are each at least 10 bit and the classes arefixed at least three-dimensionally on these channels and three absolutecolor signals are produced, characterized in that the flow isilluminated in such a manner that the color temperature of the lightingis always kept stable and a bias correction is carried out to theabsolute color signals R, G and B of a color probe by taking intoaccount the response of the zero value of the actual light intensity ofeach channel and the absolute color signals are corrected to be relativeby dividing the value of the absolute color signal of each channel withthe sum (R+G+B) of the values of the signals of all channels.
 2. Methodaccording to patent claim 1, characterized in that a CCD color linecamera is used as the camera.
 3. Method according to patent claim 1,characterized in that an essentially unitary image area is scanned and acorresponding image matrix is formed and the corrections of the imageand the classification of pixels are effected as matrix operations. 4.Method according to patent claim 1, characterized in that the gray scalevalue is measured as also the distance between the camera and the flowof wood material, according to which the gray scale value that isobtained is corrected and the pixels are classified into the chosenclasses according to the chosen gray scale criterion and the wood/barkratio is calculated in accordance with the chosen condition by usingboth the already mentioned at least three-channel classification and thegray scale classification.
 5. Method according to patent claim 4,characterized in that an intensity matrix is formed from at least onerelative color signal and a corrected intensity matrix is obtained bythe gray scale value from the intensity matrix and forms of areas in theflow of wood material are recognized from the corrected intensitymatrix, an additional criteria is set to the chosen class in theclassification stating that a pixel that is to be placed in this classmust belong to a form area that fulfills the criteria.